During testing for margin defects in packaged semiconductor integrated circuit chips, it is desirable to vary the voltage level of the substrate from its normal negative operating level. One method is to set the substrate voltage level to ground. However, setting the substrate voltage level to ground during testing of some types of chips, such as 16-megabyte memory chips, may be an unrealistic testing condition because some chips that fail the testing process would operate satisfactorily with a negatively biased substrate. What is needed is an on-chip substrate regulator with the ability to vary the substrate voltage level during testing to be more positive or more negative than its normal negative operating level while maintaining the substrate voltage level below ground.